package com.ruoyi.ihome.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.domain.entity.SysUser;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;


/**
 * 房间信息对象 ih_home
 * 
 * @author NING
 * @date 2024-08-12
 */
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
public class IhHome extends BaseEntity implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** 房间id */
    private Long id;

    /** 小区名 */
    @Excel(name = "小区名")
    private String houseName;

    /** 房间描述 */
    @Excel(name = "房间描述")
    private String houseDescription;

    /** 房屋朝向（0,1,2,3对应东西南北 */
    @Excel(name = "房屋朝向", readConverterExp = "房屋朝向（0,1,2,3对应东西南北")
    private Long orientation;

    /** 经度 */
    @Excel(name = "经度")
    private BigDecimal longitude;

    /** 纬度 */
    @Excel(name = "纬度")
    private BigDecimal latitude;

    /** 面积 */
    @Excel(name = "面积")
    private BigDecimal area;

    /** 暖气（0有 1无 */
    @Excel(name = "暖气", readConverterExp = "暖气（0有 1无")
    private Long heating;

    /** 房间年份 */
    @Excel(name = "房间年份")
    private Long years;

    /** 入住期限id */
    @Excel(name = "入住期限id")
    private Long checkId;

    /** 租期 */
    @Excel(name = "租期")
    private Long lease;

    /** 绿化(0有 1无 */
    @Excel(name = "绿化(0有 1无")
    private Long green;

    /** 楼层 */
    @Excel(name = "楼层")
    private Long floor;

    /** 省份id */
    @Excel(name = "省份id")
    private Long provinceId;

    /** 是否隔断（0是 1否 */
    @Excel(name = "是否隔断", readConverterExp = "是否隔断（0是 1否")
    private Long isPartition;

    /** 租金 */
    @Excel(name = "租金")
    private BigDecimal price;

    @Excel(name = "租金最大值")
    private BigDecimal priceMax;

    @Excel(name = "租金最小值")
    private BigDecimal priceMin;

    @Excel(name = "面积最大")
    private BigDecimal areaMax;

    @Excel(name = "面积最小")
    private BigDecimal areaMin;

    /** 户型 */
    @Excel(name = "户型")
    private String houseType;

    /** 卧室（0，1，2，3 房间朝向东西南北 */
    @Excel(name = "卧室", readConverterExp = "卧室（0，1，2，3 房间朝向东西南北")
    private Long room;

    /** 出租人(0房东直租，1个人转租 */
    @Excel(name = "出租人(0房东直租，1个人转租")
    private Long lessor;

    /** 出租类型(0整租，1合租 */
    @Excel(name = "出租类型(0整租，1合租")
    private Long leaseType;

    /** 审核状态（0审核中，1审核未通过，2审核通过 */
    @Excel(name = "审核状态", readConverterExp = "审核状态（0审核中，1审核未通过，2审核通过")
    private Long status;

    /** 上下架(0上架，1下架 */
    @Excel(name = "上下架(0上架，1下架")
    private Long rentStatus;

    /** 逻辑删除(0未删除，1删除 */
    @Excel(name = "逻辑删除(0未删除，1删除")
    private Long del;

    /** 电梯(0有，1无 */
    @Excel(name = "电梯(0有，1无")
    private Long elevator;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 封面图 */
    @Excel(name = "封面图")
    private String listView;

    @Excel(name = "排序")
    private Integer sort;


    /*多表（多对多）
    * */
    /*房间标签*/
//    private List<IhHomeTag> ihHomeTag;

     /* 房间配置 */
     @Excel(name = "房间配置")
    private List<RoomAndDistrict> roomAndDistrict;

    /*房屋设施*/
    @Excel(name = "房屋设施")
    private List<HomeAndFacility> homeAndFacility;



//    public IhHome(List<IhHomeTag> ihHomeTag) {
//        this.ihHomeTag = ihHomeTag;
//    }
    @TableField
    private Long[] ihHomeTags;

    public List<IhHomeTag> getIhHomeTag() {
        return ihHomeTag;
    }

    public void setIhHomeTag(List<IhHomeTag> ihHomeTag) {
        this.ihHomeTag = ihHomeTag;
    }


    private Long[] taglist;

    /*关联查新用户*/
    private SysUser sysUser;






    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setHouseName(String houseName) 
    {
        this.houseName = houseName;
    }

    public String getHouseName() 
    {
        return houseName;
    }
    public void setHouseDescription(String houseDescription) 
    {
        this.houseDescription = houseDescription;
    }

    public String getHouseDescription() 
    {
        return houseDescription;
    }
    public void setOrientation(Long orientation) 
    {
        this.orientation = orientation;
    }

    public Long getOrientation() 
    {
        return orientation;
    }
    public void setLongitude(BigDecimal longitude) 
    {
        this.longitude = longitude;
    }

    public BigDecimal getLongitude() 
    {
        return longitude;
    }
    public void setLatitude(BigDecimal latitude) 
    {
        this.latitude = latitude;
    }

    public BigDecimal getLatitude() 
    {
        return latitude;
    }
    public void setArea(BigDecimal area) 
    {
        this.area = area;
    }

    public BigDecimal getArea() 
    {
        return area;
    }
    public void setHeating(Long heating) 
    {
        this.heating = heating;
    }

    public Long getHeating() 
    {
        return heating;
    }
    public void setYears(Long years) 
    {
        this.years = years;
    }

    public Long getYears() 
    {
        return years;
    }
    public void setCheckId(Long checkId) 
    {
        this.checkId = checkId;
    }

    public Long getCheckId() 
    {
        return checkId;
    }
    public void setLease(Long lease) 
    {
        this.lease = lease;
    }

    public Long getLease() 
    {
        return lease;
    }
    public void setGreen(Long green) 
    {
        this.green = green;
    }

    public SysUser getSysUser() {
        return sysUser;
    }

    public void setSysUser(SysUser sysUser) {
        this.sysUser = sysUser;
    }

    public Long getGreen()
    {
        return green;
    }
    public void setFloor(Long floor) 
    {
        this.floor = floor;
    }

    public Long getFloor() 
    {
        return floor;
    }
    public void setProvinceId(Long provinceId) 
    {
        this.provinceId = provinceId;
    }

    public Long getProvinceId() 
    {
        return provinceId;
    }
    public void setIsPartition(Long isPartition) 
    {
        this.isPartition = isPartition;
    }

    public Long getIsPartition() 
    {
        return isPartition;
    }
    public void setPrice(BigDecimal price) 
    {
        this.price = price;
    }

    public BigDecimal getPrice() 
    {
        return price;
    }
    public void setHouseType(String houseType) 
    {
        this.houseType = houseType;
    }

    public String getHouseType() 
    {
        return houseType;
    }
    public void setRoom(Long room) 
    {
        this.room = room;
    }

    public Long getRoom() 
    {
        return room;
    }
    public void setLessor(Long lessor) 
    {
        this.lessor = lessor;
    }

    public Long getLessor() 
    {
        return lessor;
    }
    public void setLeaseType(Long leaseType) 
    {
        this.leaseType = leaseType;
    }

    public Long getLeaseType() 
    {
        return leaseType;
    }
    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }
    public void setRentStatus(Long rentStatus) 
    {
        this.rentStatus = rentStatus;
    }

    public Long getRentStatus() 
    {
        return rentStatus;
    }
    public void setDel(Long del) 
    {
        this.del = del;
    }

    public Long getDel() 
    {
        return del;
    }
    public void setElevator(Long elevator) 
    {
        this.elevator = elevator;
    }

    public Long getElevator() 
    {
        return elevator;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setListView(String listView) 
    {
        this.listView = listView;
    }

    public String getListView() 
    {
        return listView;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("houseName", getHouseName())
            .append("houseDescription", getHouseDescription())
            .append("orientation", getOrientation())
            .append("longitude", getLongitude())
            .append("latitude", getLatitude())
            .append("area", getArea())
            .append("heating", getHeating())
            .append("years", getYears())
            .append("checkId", getCheckId())
            .append("lease", getLease())
            .append("green", getGreen())
            .append("floor", getFloor())
            .append("provinceId", getProvinceId())
            .append("isPartition", getIsPartition())
            .append("price", getPrice())
            .append("houseType", getHouseType())
            .append("room", getRoom())
            .append("createTime", getCreateTime())
            .append("lessor", getLessor())
            .append("leaseType", getLeaseType())
            .append("status", getStatus())
            .append("rentStatus", getRentStatus())
            .append("del", getDel())
            .append("elevator", getElevator())
            .append("userId", getUserId())
            .append("listView", getListView())
            .toString();
    }
/*    @TableField
    private Long[] ihHomeTag;*/
    @TableField
    private List<IhHomeTag> ihHomeTag;

    @TableField
    private Long[] ihHomeFacility;

    @TableField
    private List<List<String>> roomDistrictList;
}
